<template>
	<view>
		<u-navbar title="“六税两费”政策匹配" :titleStyle="{'left':0}"></u-navbar>

		<view class="roundcenter">
			<view class="round">
				<view class="avatar">
					<image src="@/static/img/logox.png"></image>
				</view>
			</view>
			<view class="formcontent">
				<u-form :model="form" ref="uForm">
					<!-- <u-form-item label="您的企业是否为增值税小规模纳税人,个体工商户或小型微利企业" prop="leixing" required label-width="140"
						border-bottom :label-position="'top'">
						<u-radio-group v-model="form.leixing">
							<u-radio active-color="#ffc92a" :name="1">
								否
							</u-radio>
							<u-radio active-color="#ffc92a" :name="0">
								是
							</u-radio>
						</u-radio-group>
					</u-form-item> -->
					<u-form-item label="您的企业类型为以下哪类？" prop="leixing" required label-width="140" border-bottom
						:label-position="'top'">
						<u-radio-group v-model="form.leixing">
							<u-radio active-color="#ffc92a" :name="1">
								增值税小规模纳税
							</u-radio>
							<u-radio active-color="#ffc92a" :name="2">
								个体工商户
							</u-radio>
							<u-radio active-color="#ffc92a" :name="3">
								小型微利企业
							</u-radio>
							<u-radio active-color="#ffc92a" :name="4">
								不属于上述类型的企业
							</u-radio>
						</u-radio-group>
					</u-form-item>
<!-- 					<u-form-item label="从事国家非限制和禁止行业" prop="jinzhi" required label-width="140" border-bottom
						:label-position="'top'" v-if="form.leixing==4">
						<u-radio-group v-model="form.jinzhi">
							<u-radio active-color="#ffc92a" :name="1">
								是
							</u-radio>
							<u-radio active-color="#ffc92a" :name="0">
								否
							</u-radio>
						</u-radio-group>
					</u-form-item>
					<u-form-item label="年度应纳税所得额是否超过300万元" prop="shifouchaoguo" required label-width="140" border-bottom
						:label-position="'top'" v-if="form.leixing==4">
						<u-radio-group v-model="form.shifouchaoguo">
							<u-radio active-color="#ffc92a" :name="1">
								超过
							</u-radio>
							<u-radio active-color="#ffc92a" :name="0">
								不超过
							</u-radio>
						</u-radio-group>
					</u-form-item>
					<u-form-item label="从业人数不超过300人" prop="renshu" required label-width="140" border-bottom
						:label-position="'top'" v-if="form.leixing==4">
						<u-radio-group v-model="form.renshu">
							<u-radio active-color="#ffc92a" :name="1">
								超过
							</u-radio>
							<u-radio active-color="#ffc92a" :name="0">
								不超过
							</u-radio>
						</u-radio-group>
					</u-form-item>
					<u-form-item label="资产总额不超过5000万元" prop="zczonge" required label-width="140" border-bottom
						:label-position="'top'" v-if="form.leixing==4">
						<u-radio-group v-model="form.zczonge">
							<u-radio active-color="#ffc92a" :name="1">
								超过
							</u-radio>
							<u-radio active-color="#ffc92a" :name="0">
								不超过
							</u-radio>
						</u-radio-group>
					</u-form-item>
					 -->
					<!-- <u-form-item label="年龄阶段" prop="age" required label-width="140" border-bottom>
						<u-input v-model="form.age" placeholder="请输入年龄" />
					</u-form-item>
					<u-form-item label="联系方式" prop="tel" len="11" required label-width="140" border-bottom>
						<u-input v-model="form.tel" placeholder="请输入联系方式" />
					</u-form-item> -->
				</u-form>
			</view>
		</view>
		<view class="organization combg" v-if="!keyongyouhui">
			<!-- 			<view class="organizationtitle">
				<image src="../img/organ.png"></image>
				<text>测评机构</text>
			</view> -->
			<view class="savebutton" @click="submit">开始匹配</view>
			<!-- 			<navigator url="/pages/questions/questions" open-type="navigate">
				
			</navigator> -->
		</view>
		<view class="organization combg" v-if="keyongyouhui">
			<view style="font-size: 32rpx;" class="text-bold">【优惠内容】</view>
			<view style="font-size: 24rpx;margin: 20rpx 0;">
				1、由省、自治区、直辖市人民政府根据本地区实际情况，以及宏观调控需要确定，对增值税小规模纳税人、小型微利企业和个体工商户可以在50%的税额幅度内减征资源税、城市维护建设税、房产税、城镇土地使用税、印花税（不含证券交易印花税）、耕地占用税和教育费附加、地方教育附加。

			</view>
			<view style="font-size: 24rpx;">
				2、增值税小规模纳税人、小型微利企业和个体工商户已依法享受资源税、城市维护建设税、房产税、城镇土地使用税、印花税、耕地占用税、教育费附加、地方教育附加其他优惠政策的，可叠加享受本公告第一条规定的优惠政策。

			</view>
			<view style="font-size: 32rpx;margin: 20rpx 0;" class="text-bold">【政策依据】</view>
			<view class="text-blue" style="margin-bottom: 20rpx;"
				@click="towebview('http://www.chinatax.gov.cn/chinatax/n364/c5173254/content.html')">
				1、《关于进一步实施小微企业“六税两费”减免政策的公告》（财政部 税务总局公告2022年第10号）</view>
			<view class="text-blue"
				@click="towebview('http://www.chinatax.gov.cn/chinatax/n364/c5173291/content.html')">
				2、《国家税务总局关于进一步实施小微企业“六税两费”减免政策有关征管问题的公告》（国家税务总局公告2022年第3号）</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyongyouhui: false,
				form: {
					leixing:null,
					jinzhi: null,
					sex: null,
					shifouchaoguo: null,
					renshu: null,
					renshu: null,
					zczonge: null
				},
				sexList: [{
						name: '增值税小规模纳税人',
						disabled: false
					},
					{
						name: '个体工商户',
						disabled: false
					},
					{
						name: '小型微利企业',
						disabled: false
					}
				],
				rules: {
					name: [{
						required: true,
						message: '请输入企业名称',
						trigger: ['change', 'blur']
					}],
					// leixing: [{
					// 	required: true,
					// 	message: '请选择企业类型',
					// 	trigger: ['change', 'blur']
					// }],
					// leixing: [{
					// 	required: true,
					// 	message: '请选择企业类型',
					// 	trigger: ['change', 'blur']
					// }],
					jieduan: [{
						required: true,
						message: '请选择企业发展阶段',
						trigger: ['change', 'blur']
					}],
					shijian: [{
						required: true,
						message: '请选择企业成立时间',
						trigger: ['change', 'blur']
					}],
					guimo: [{
						required: true,
						message: '请选择企业规模大小',
						trigger: ['change', 'blur']
					}],
				}
			}
		},
		methods: {
			towebview(url) {
				uni.navigateTo({
					url: "/pages/tabbar/home/web-view?src=" + url
				})
			},
			submit() {
				console.log("submit************")
				this.$refs.uForm.validate(valid => {
					if (valid) {
						let form = this.form;
						let yescount = 0;
						if (form.leixing == 4) {
							uni.showModal({
								title: "错误",
								content: "您的企业不适用减免政策"
							})
							return;
							// for (let i in form) {
							// 	if (form[i]) {
							// 		yescount++;
							// 	}
							// }
							// if (yescount < 4) {
							// 	this.keyongyouhui = false;
							// 	uni.showModal({
							// 		title: "错误",
							// 		content: "您的企业不符合小型微利企业标准，不适用减免政策"
							// 	})
							// 	return;
							// }
						}
						uni.showModal({
							title:"成功",
							content:"您的企业满足政策享受条件，点击确认查看政策",
							showCancel:false,
							success:()=> {
								this.keyongyouhui = true;
							}
						})
					} else {
						console.log('验证失败');
					}
				});
			}
		},
		onReady() {
			this.$refs.uForm.setRules(this.rules);
		}
	}
</script>

<style scoped>
	page {
		background-color: #3f48cc;
	}

	.roundcenter {
		width: 686rpx;
		margin: 60rpx auto 0 auto;
		background: #fff;
		box-shadow: 0 40rpx 0 -22rpx rgb(63 72 204 / 23%), 0 -9px 0 0 rgb(63 72 204 / 14%) inset;
		border-radius: 50rpx;
		padding-bottom: 40rpx;
	}

	.round {
		width: 100%;
		height: 124rpx;
		background: url(../img/roundbg.png) no-repeat 50%/100%;
	}

	.avatar {
		width: 125rpx;
		height: 135rpx;
		border-radius: 50%;
		box-shadow: 0 -9rpx 0 0 rgb(105 100 87 / 14%) inset;
		margin: auto;
	}

	.avatar image {
		width: 125rpx;
		height: 125rpx;
	}

	.formcontent {
		padding: 40rpx;
	}

	.formcontent .label-text span {
		font-size: 26rpx;
	}

	.organization .organizationtitle image {
		width: 32rpx;
		height: 30rpx;
		vertical-align: middle;
		margin-right: 10rpx;
	}

	.organization .organizationtitle text {
		font-size: 28rpx;
		vertical-align: middle;
		color: #857f77;
	}

	.savebutton {
		width: 622rpx;
		line-height: 90rpx;
		color: #fff;
		font-size: 32rpx;
		font-weight: 700;
		/* margin: 70rpx auto; */
		text-align: center;
		background: url(../img/savebtn.png) no-repeat 50%/100%;
	}
</style>
